/*
 * Lab4A.cpp
 *
 *  Created on: 2012-01-08
 *      Author: Anthony Varghese
 * Description: A simple program showing how to use C++ string objects
 */
#include <iostream>
#include <string>

using namespace std;

int main(){
	cout << "Part I" << endl;
	// Using string constructors and console output;
	string a;
	string b("Four");
	string c = "score";

	cout << a << endl;
	cout << b << endl;
	cout << c << endl;

	string d = a + b + c;
	cout << "b + a + c is: " << d << endl;



	cout << endl << endl << "Part II" << endl;
	// Using console input (the keyboard)
	cout << "Enter a string> ";
	cin >> b;
	cout << "You entered: " << b << endl;

	cout << "Enter a line of text> ";
	getline( cin, b);
	cout << "You entered: " << b << endl;
/*
	cout << endl << endl << "Part III" << endl;
	// Pitfall with cin and getline
	cout << "Enter a number and a line of text> ";
	int number;
	cin >> number;
	getline( cin, b );
	cout << "  You entered: " << number << " and " << b << "." << endl;
*/
}
